package pl.taskman.helper;

import java.awt.Color;

public class ColorHelper
{
	public static Color	BROWN			= new Color(185, 122, 87);
	public static Color	DARK_RED		= new Color(136, 0, 21, 255);
	public static Color	RED				= new Color(237, 28, 36, 255);
	public static Color	ORANGE			= new Color(255, 127, 39, 255);
	public static Color	GOLD			= new Color(255, 201, 14, 255);
	public static Color	YELLOW			= new Color(255, 242, 0, 255);
	public static Color	GOLDEN_FIZZ		= new Color(252, 244, 54, 255);
	public static Color	GREEN			= new Color(34, 177, 76, 255);
	public static Color	LIME			= new Color(181, 230, 39, 255);
	public static Color	TURQUOISE		= new Color(0, 162, 232, 255);
	public static Color	CYAN			= new Color(153, 217, 234, 255);
	public static Color	INDYGO			= new Color(63, 72, 204, 255);
	public static Color	PURPLE			= new Color(163, 73, 164, 255);
	public static Color	PINK			= new Color(255, 174, 201, 255);

	public static Color MINE_SHAFT		= new Color(51, 51, 51, 255);
	
	public static int setValue(int val)
	{
		if (val > 255) val = 255;
		if (val < 0) val = 0;

		return val;
	}
	
	public static Color darken(Color color, int val)
	{
		Color darkenedColor = new Color(setValue(color.getRed() - val),
						setValue(color.getGreen() - val),
						setValue(color.getBlue() - val),
						color.getAlpha());
		
		return darkenedColor;
	}
	
	public static Color lighten(Color color, int val)
	{
		Color lightendColor = new Color(setValue(color.getRed() + val),
						setValue(color.getGreen() + val),
						setValue(color.getBlue() + val),
						color.getAlpha());
		
		return lightendColor;
	}
}
